<div>
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Logistics <small>{{ '-> '+ curr_status }}</small></h1>
        </div>
        <div class="">
            <div class="filter">
                <div class="tabs">
                    <span class="tab available" ng-class="{on: status == curr_status}" ng-repeat="status in ['ALL','PENDING_REVIEW', 'TRANSFER_APPROVED','WAREHOUSE_IN','PAYMENT_RECEIVED','PROCESSING','SHIPPING','PORT_ARRIVED','RECEIVED','RETURNED']">
                        <a ng-click="setStatus(status)">{{status}}</a>
                    </span>
                </div>
            </div>
            <div class="form-group search-box">
                <label>包裹ID/ CTN /MB No: </label>
                <input class="form-control" ng-model="tempQuery">
                <label>Extra: </label>
                <select ng-model="tempExtra" class="form-control">
                    <option value="receiver">收件人</option>
                    <option value="order_id">订单号</option>
                </select>
                <input class="form-control" ng-model="tempExtraValue">

            </div>
            <div class="form-group filter-box">
                <label>物流商: </label>
                <select class="form-control" ng-model='tempPartner' ng-options="p for p in availablePartner"></select>
                <label>Channel: </label>
                <select class="form-control" ng-model='tempChannel' ng-options="c for c in ['US_EPAC', 'HKDHL']"></select>
                <button class="btn btn-primary" ng-click="setParams(start, end)">搜索</button>
                <button class="btn btn-default" ng-click="reset()">Reset</button>
                <button class="btn btn-default" ng-click="showDateFilter()">展示时间筛选</button>
            </div>
            <div class="form-group filter-box" ng-show="DateBoxShown">
                <label>From: </label>
                <input type="date" class="form-control" ng-model="start"/>
                <label>To: </label>
                <input type="date" class="form-control" ng-model="end"/>
            </div>
            <div class="form-group filter-box">
                <button class="btn btn-success" ng-click="toggleAll()">Toggle All</button>
                <button class="btn btn-success" ng-click="exportCSV()">Export as csv</button>
            </div>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <div class="row">
        <div class="">
            <section ng-repeat="m in results"
                class="panel folder on panel-default mallOrder">
                <logistics-header></logistics-header>
            </section>

            <bgf-pagination collection="results"
                per-page="25"
                reload-page="reloadPage"
                url-params="searchParams"
                url="'/admin/n/logistics'">
            </bgf-pagination>
        </div>
    </div>
    <div class="new_expense_btn" ng-click="mergeLogistics()">
        <button class="btn btn-sm btn-success submit">合并</button>
    </div>
    <div class="split_entries_btn" ng-click="splitEntries()">
        <button class="btn btn-sm btn-danger submit">拆分</button>
    </div>
</div>
